<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <title>mmap</title>
    <meta charset="utf-8">
    <script type="text/javascript">
        var strImgsvrUrl = "${pageContext.request.contextPath}/smap/gallery/${smap.id}/";
        var strMapsvrUrl = "${pageContext.request.contextPath}/smap/gallery/${smap.id}/";
    </script>
    <jsp:include page="/include.jsp"/>
    <script src="${pageContext.request.contextPath}/mmap/mapi1.0.js"></script>
    <script src="${pageContext.request.contextPath}/mmap/design_fence.js"></script>
    <style type="text/css">
        * {
            margin: 0px;
            padding: 0px;
        }

        .line_css {
            border: 1px solid red;
            position: absolute;
            background-color: #f2dede;
            padding: 5px;
            color: #b94a48;
            top: 0;
            left: 0;
            display: none;
        }

        .clear {
            cursor: pointer;
            position: absolute;
            font-size: 12px;
            margin: 5px;
            border: 1px solid green;
            padding: 3px;
            background-color: red;
        }
    </style>
    <script type="text/javascript">
        var basePath = '${pageContext.request.contextPath}';
    </script>
</head>
<body class="easyui-layout">
<div data-options="region:'east',title:'编辑报警区域',split:true" style="width:400px;">
    <form id="form" method="post">
        <input type="hidden" id="id" name="id" value="${id}">
        <input type="hidden" id="smapId" name="smapId" value="${smapId}">
        <input type="hidden" id="fence_polylinePts" name="geoText" value="${geoText}">
        <table style="width: 100%;" class="listtable">
            <tr>
                <td class="tr_left" style="width: 180px;"><span class="required">*</span>报警区域名称:&nbsp;</td>
                <td class="tr_right">
                    <input type="text" name="name" value="${name}" maxlength="200"  class="easyui-validatebox" data-options="required:true,missingMessage:'请输入地图名称',tipPosition:'top'"/>
                </td>
            </tr>
            <tr>
                <td class="tr_left" style="width: 180px;"><span class="required">*</span>AP mac地址:&nbsp;</td>
                <td class="tr_right">
                    <input type="text" name="code" value="${code}" maxlength="200"  class="easyui-validatebox" data-options="required:true,missingMessage:'请输入地图名称',tipPosition:'top'"/>
                </td>
            </tr>
            <tr>
                <td class="tr_left"><span class="required">*</span>报警级别:&nbsp;</td>
                <td class="tr_right">
                    <input type="text" id="select_reqioninfo" name="regionId" value="${regionId}" class="easyui-combobox" data-options="required:true,missingMessage:'请选择舱室报警级别',tipPosition:'top'"/>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right;">
                    <a id="save" href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
                    <a id="btn" href="javascript:window.history.go(-1);" class="easyui-linkbutton" data-options="iconCls:'icon-back'">返回</a>
                </td>
            </tr>
        </table>
    </form>
</div>
<div data-options="region:'center',title:'地图'" style="padding:5px;background:#eee;">
    <div id="mmap1" style="width:250px;height:250px;float:left;"></div>
    <div id="mmap" style="width:600px;height:600px;float:left;"></div>
</div>


<div id="message" class="line_css">
    在地图上点击鼠标左键绘制区域，双击结束
</div>
<div id="clear" class="clear">
    清除区域
</div>
</body>
</html>